package core

//Hash Signature 初始值为[]byte("") 经rlp序列化之后计算Hash 再对Hash进行签名
type ContendBlock struct {
	Index                uint64
	Timestamp            uint64
	Difficult            uint64
	Nonce                uint64
	PublicKey            []byte
	TransactionBlockHash []byte
	PrevContendBlockHash []byte
	Hash                 []byte
	Signature            []byte
}

type TransactionBlockHeader struct {
	Index                    uint64
	Timestamp                uint64
	ContendBlockHash         []byte
	PublicKey                []byte
	PrevTransactionBlockHash []byte
	MerkleRootHash           []byte
	Hash                     []byte
	Signature                []byte
}

type TransactionBlockBody struct {
	Trans []Transaction
}

type TransactionBlock struct {
	TransactionBlockHeader
	TransactionBlockBody
}

func (c *ContendBlock) Check(prevblock *ContendBlock) {

}
